public class Main {
    public static void main(String[] args) {
        int[] numbers = {2, 4, 3, 2, 5, 4};
        System.out.println("The single element is: " + findSingleElement(numbers));
    }
    public static int findSingleElement(int[] array) {
        int single = 0;
        for (int num : array) {
            single ^= num;
        }
        return single;
    }
}
